package com.ass.llm.constant;

import lombok.AllArgsConstructor;
import lombok.Getter;

import java.util.Arrays;

/**
 *
 * @description : 适配LLM 枚举
 * @author : liyong
 * @date : 2025-06-19 16:32:08
 * @since :1.0
 **/
@Getter
@AllArgsConstructor
public enum LLMEnum {

    //百炼平台
    BAILIAN_LLM("01","alibaba","BAILIAN","bailian"),

    //dify平台
    DIFY_LLM("02","dify","DIFY","dify"),
//
//    //deepseek
//    DEEP_SEEK_LLM("03","deep exploration","DEEPSEEK","deepseek",new DeepSeekChatLLm()),
//
//    //第三方接口 例如AI应用网关平台
    JKR_AI_LLM("04","jkr","AIGATEWAY","aigateway")

    ;
    //平台标识
    private String code;

    //所属厂家
    private String manufacturer;

    private String uppercase;

    private String lowercase;




    /**
     * 获取大写uppercase的全部属性
     *
     * @author: Li yong
     * @date: 2024/3/21 10:09
     * @param uppercase:
     * @return: com.sx.common.SourceEnum
     */
    public static LLMEnum getLLMEnumByUpper(String uppercase) {
        return Arrays.stream(LLMEnum.values())
                .filter(source->source.uppercase.equals(uppercase))
                .findFirst().orElse(null);
    }

    /**
     * 获取小写lowercase的全部属性
     *
     * @author: Li yong
     * @date: 2024/3/21 10:09
     * @param lowercase:
     * @return: com.sx.common.SourceEnum
     */
    public static LLMEnum getLLMEnumByLower(String lowercase) {
        return Arrays.stream(LLMEnum.values())
                .filter(source->source.lowercase.equals(lowercase))
                .findFirst().orElse(null);
    }


}
